package com.example.cinema.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.List;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;

/**
 * <p>
 * 
 * </p>
 *
 * @author yc138
 * @since 2024-08-26
 */
@Data
@TableName("studios")
public class Studios implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @NotBlank(message = "影院名称不能为空")
    @TableField("name")
    private String name;

    @NotBlank(message = "影院地址不能为空")
    @TableField("addr")
    private String addr;

    @NotBlank(message = "联系方式和营业时间不能为空")
    @TableField("des")
    private String des;

    @NotBlank(message = "影院图片不能为空")
    @TableField("image")
    private String image;

    @NotBlank(message = "影院状态不能为空")
    @TableField("status")
    private String status;

    @TableField(exist = false)
    private List<Hall> halls;

    @TableField(exist = false)
    private Integer total;

}
